import { createRequest } from './index'
import { formData } from '@/request/common'
//收藏的项目列表
export const getCollectedProjectList = (data) => {
    return createRequest({
        url: `/student/collect-project/page`,
        method: 'get',
        params: {
            ...data
        }
    })
}

//参与的项目列表
export const getJoinedProjectList = (data) => {
    return createRequest({
        url: `/student/student-project/page`,
        method: 'get',
        params: {
            ...data
        }
    })
}


//获取学生信息
export const getStudentInformation = () => {
    return createRequest({
        url: `/student/studentClassGrade`,
        method: 'get',
    })
}

//修改学生信息
export const modifyStudentInformation = (data) => {
    return createRequest({
        url: `/student/personalInformation`,
        method: 'post',
        data
    })
}

//获取教师信息
export const getTeacherInformation = () => {
    return createRequest({
        url: `/teacher/info`,
        method: 'get',
    })
}

//修改学生信息
export const modifyTeacherInformation = (data) => {
    return createRequest({
        url: `/teacher/personalInformation`,
        method: 'post',
        params:data
    })
}




// 上传文件
export const uploadAvatar = ( data) => {
  return createRequest({
    url: `/teacher/uploadAvatar`,
    method: 'post',
    data: formData(data)
  })
}

// 上传学生文件
export const stuUploadAvatar = ( data) => {
    return createRequest({
      url: `/student/uploadAvatar`,
      method: 'post',
      data: formData(data)
    })
  }
  